#pragma once
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>

class FFmpegEncoder {
public:
    FFmpegEncoder();
    ~FFmpegEncoder();
    bool open(const std::string& output_url, int width, int height, int fps = 25, int bitrate = 400000);
    bool writeFrame(const cv::Mat& frame);
    void close();
    bool isOpened() const;
private:
    struct Impl;
    Impl* impl_;
};
